tr:first-child {
  background-color: yellow;
}

table {
  border: 1px solid black;
  border-spacing: 0px;
  border-collapse: collapse;
}

tr,
td {
  border: 1px solid black;
  padding: 20px;
}


tr:nth-of-type(2n):not(:first-child) {
  background-color: gray;

}

tr:nth-of-type(2n-1):not(:first-child) {
  background-color: red;

}